"""
仪表盘序列化器
"""
from rest_framework import serializers


class DashboardStatsSerializer(serializers.Serializer):
    """仪表盘统计数据序列化器"""
    total_students = serializers.IntegerField()
    total_resumes = serializers.IntegerField()
    total_interviews = serializers.IntegerField()
    total_jobs = serializers.IntegerField()
    total_companies = serializers.IntegerField()
    total_applications = serializers.IntegerField()


class StudentEmploymentStatsSerializer(serializers.Serializer):
    """学生就业状态统计序列化器"""
    employed = serializers.IntegerField()
    unemployed = serializers.IntegerField()
    further_study = serializers.IntegerField()
    self_employed = serializers.IntegerField()
    military = serializers.IntegerField()


class ResumeStatsSerializer(serializers.Serializer):
    """简历状态统计序列化器"""
    draft = serializers.IntegerField()
    in_progress = serializers.IntegerField()
    pending_review = serializers.IntegerField()
    under_review = serializers.IntegerField()
    approved = serializers.IntegerField()
    rejected = serializers.IntegerField()
    needs_revision = serializers.IntegerField()


class InterviewStatsSerializer(serializers.Serializer):
    """面试状态统计序列化器"""
    scheduled = serializers.IntegerField()
    in_progress = serializers.IntegerField()
    completed = serializers.IntegerField()
    cancelled = serializers.IntegerField()


class JobStatsSerializer(serializers.Serializer):
    """岗位状态统计序列化器"""
    published = serializers.IntegerField()
    draft = serializers.IntegerField()
    closed = serializers.IntegerField()
    expired = serializers.IntegerField()
    applications = serializers.DictField()


class MonthlyTrendSerializer(serializers.Serializer):
    """月度趋势数据序列化器"""
    month = serializers.CharField()
    interviews = serializers.IntegerField()
    completed_interviews = serializers.IntegerField()
    applications = serializers.IntegerField()
    approved_applications = serializers.IntegerField()


class UserRoleStatsSerializer(serializers.Serializer):
    """用户角色统计序列化器"""
    admin = serializers.IntegerField()
    teacher = serializers.IntegerField()
    student = serializers.IntegerField()
    total = serializers.IntegerField()


class RecentActivitySerializer(serializers.Serializer):
    """最近活动序列化器"""
    id = serializers.IntegerField()
    type = serializers.CharField()
    title = serializers.CharField()
    description = serializers.CharField()
    user = serializers.CharField()
    created_at = serializers.DateTimeField()


class PersonalizedStatsSerializer(serializers.Serializer):
    """个性化统计序列化器"""
    role = serializers.CharField()
    data = serializers.DictField()


class SystemOverviewSerializer(serializers.Serializer):
    """系统概览序列化器"""
    total_users = serializers.IntegerField()
    active_users = serializers.IntegerField()
    total_data_size = serializers.CharField()
    system_uptime = serializers.CharField()


class UserActivitySerializer(serializers.Serializer):
    """用户活跃度序列化器"""
    date = serializers.DateField()
    active_users = serializers.IntegerField()
    new_users = serializers.IntegerField()
    login_count = serializers.IntegerField()


class GrowthTrendSerializer(serializers.Serializer):
    """增长趋势序列化器"""
    period = serializers.CharField()
    students_growth = serializers.FloatField()
    resumes_growth = serializers.FloatField()
    interviews_growth = serializers.FloatField()
    jobs_growth = serializers.FloatField()
